220
How can I remove all the columns

Dim oComboBox as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Clear()

219
How can I remove a column

Dim oComboBox as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Remove("A")

482
How can I put icons/images into buttons

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.SingleEdit = .t.
oComboBox.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
oComboBox.Columns.Add("")
var_Column = oComboBox.Columns.Add("C+B")
	var_Column.AllowSizing = .f.
	var_Column.Width = 48
	var_Column.FormatColumn = "` <img>` + ( 1 + (1 index ``) mod 3 ) + `</img> `"
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	' var_Column.Def(0) = .t.
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(0) = True"

	' var_Column.Def(2) = .t.
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(2) = True"

	' var_Column.Def(3) = .t.
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(3) = True"

	var_Column.Position = 0
oComboBox.DrawGridLines = 2
oComboBox.DefaultItemHeight = 20
var_Items = oComboBox.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 4")
	var_Items.AddItem("Item 5")
	var_Items.AddItem("Item 6")
	var_Items.AddItem("Item 7")
	var_Items.AddItem("Item 8")
oComboBox.EndUpdate()

205
How can I programmatically filter a column

Dim oComboBox as P
Dim var_Column as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Filter")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 2
oComboBox.Items.AddItem()
oComboBox.Items.AddItem("not empty")
oComboBox.ApplyFilter()

503
How can I programmatically clear the control's filter
' Occurs when the user presses and then releases the left mouse button over the list control.
function Click as v ()
	oComboBox = topparent:CONTROL_ACTIVEX1.activex
	oComboBox.ClearFilter()
end function

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarPromptVisible = 1
oComboBox.FilterBarPromptPattern = "B"
oComboBox.EndUpdate()

91
How can I programmatically change the column where incremental searching is performed

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Column 1")
oComboBox.Columns.Add("Column 2")
var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("Item 1"),1) = "SubItem 1"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 1`),1) = `SubItem 1`"

oComboBox.SearchColumnIndex = 1

488
How can I prevent showing the lines for the hierarchy while using the exMatchingItemsOnly option

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.LinesAtRoot = -1
oComboBox.TreeColumnIndex = -1
oComboBox.FilterInclude = 4
var_Column = oComboBox.Columns.Add("Column")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 240
	var_Column.Filter = "C1|C2"
var_Items = oComboBox.Items
	h = var_Items.AddItem("R1")
	var_Items.InsertItem(h,,"C1")
	var_Items.InsertItem(h,,"C2")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,,"C1")
	var_Items.InsertItem(h,,"C2")
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

315
How can I merge cells

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.MarkSearchColumn = .f.
oComboBox.TreeColumnIndex = -1
oComboBox.Columns.Add("C1")
oComboBox.Columns.Add("C2")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text merges all cells in the item")
	' var_Items.ItemDivider(h) = 0
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHAlignment(h,0) = 1
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellHAlignment(h,0) = 1"


316
How can I merge cells

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.DrawGridLines = -1
oComboBox.MarkSearchColumn = .f.
oComboBox.Columns.Add("C1")
oComboBox.Columns.Add("C2")
oComboBox.Columns.Add("C3")
var_Items = oComboBox.Items
	h = var_Items.AddItem("this cell merges the first two columns")
	' var_Items.CellMerge(h,0) = 1
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellMerge(h,0) = 1"

	h = var_Items.AddItem()
	' var_Items.CellCaption(h,1) = "this cell merges the last two columns"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `this cell merges the last two columns`"

	' var_Items.CellMerge(h,1) = 2
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellMerge(h,1) = 2"

	h = var_Items.AddItem("this cell merges the all three columns")
	' var_Items.CellMerge(h,0) = 1
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellMerge(h,0) = 1"

	' var_Items.CellMerge(h,0) = 2
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellMerge(h,0) = 2"

	h = var_Items.AddItem("this draws a divider item")
	' var_Items.ItemDivider(h) = 0
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ItemDivider(h) = 0"


364
How can I mark the cells that has a specified type, ie strings only

Dim h as N
Dim oComboBox as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.ConditionalFormats.Add("type(%0) = 8").ForeColor = 255
var_ConditionalFormat = oComboBox.ConditionalFormats.Add("type(%0) = 8")
oComboBox.TemplateDef = "dim var_ConditionalFormat"
oComboBox.TemplateDef = var_ConditionalFormat
oComboBox.Template = "var_ConditionalFormat.ForeColor = 255"

oComboBox.Columns.Add("")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,2)
	var_Items.InsertItem(h,,"Chld 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


467
How can I make bigger/enlarge the control's drop down button

Dim oComboBox as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.LabelHeight = 40
oComboBox.ScrollWidth = 40
oComboBox.EndUpdate()

254
How can I make an item unselectable, or not selectable

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	h = var_Items.AddItem("unselectable - you can't get selected")
	' var_Items.SelectableItem(h) = .f.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.SelectableItem(h) = False"

	var_Items.AddItem("selectable")

7
How can I insert an icon to column's header

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
' oComboBox.Columns.Add("ColumnName").HTMLCaption = "<b>HTML</b> Column <img>1</img> Icon"
var_Column = oComboBox.Columns.Add("ColumnName")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.HTMLCaption = `<b>HTML</b> Column <img>1</img> Icon`"


6
How can I insert an icon to column's header

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
' oComboBox.Columns.Add("ColumnName").HeaderImage = 1
var_Column = oComboBox.Columns.Add("ColumnName")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.HeaderImage = 1"


295
How can I insert a hyperlink or an anchor element

Dim oComboBox as P
Dim var_Items as P
Dim var_Items1 as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	' var_Items.CellCaptionFormat(var_Items.AddItem("Just an <a1>anchor</a> element ..."),0) = 1
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaptionFormat(AddItem(`Just an <a1>anchor</a> element ...`),0) = 1"

var_Items1 = oComboBox.Items
	' var_Items1.CellCaptionFormat(var_Items1.AddItem("Just another <a2>anchor</a> element ..."),0) = 1
	oComboBox.TemplateDef = "dim var_Items1"
	oComboBox.TemplateDef = var_Items1
	oComboBox.Template = "var_Items1.CellCaptionFormat(AddItem(`Just another <a2>anchor</a> element ...`),0) = 1"


360
How can I highlight the cells or items that starts with a specified string

Dim h as N
Dim oComboBox as P
Dim var_ConditionalFormat as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.ConditionalFormats.Add("%0 startwith 'C'").Underline = .t.
var_ConditionalFormat = oComboBox.ConditionalFormats.Add("%0 startwith 'C'")
oComboBox.TemplateDef = "dim var_ConditionalFormat"
oComboBox.TemplateDef = var_ConditionalFormat
oComboBox.Template = "var_ConditionalFormat.Underline = True"

oComboBox.Columns.Add("")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"SChild 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


421
How can I highlight only parts of the cells

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'"
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


11
How can I hide the searching column

Dim oComboBox as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.MarkSearchColumn = .f.
oComboBox.Columns.Add("Column 1")
oComboBox.Columns.Add("Column 2")
oComboBox.Items.AddItem()

126
How can I hide the locked / fixed items

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.ShowLockedItems = .f.
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	' var_Items.LockedItemCount(0) = 1
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.LockedItemCount(0) = 1"

	' var_Items.CellCaption(var_Items.LockedItem(0,0),0) = "locked item"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(LockedItem(0,0),0) = `locked item`"

	var_Items.AddItem("un-locked item")

342
How can I hide the drop down buttons when the control loses the focus

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.HideDropDownButton = .t.
oComboBox.IntegralHeight = .t.
oComboBox.LinesAtRoot = 1
oComboBox.TreeColumnIndex = 1
oComboBox.Columns.Add("Column 1")
oComboBox.Columns.Add("Column 2")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root 1.1")
	' var_Items.CellCaption(h,1) = "Root 1.2"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `Root 1.2`"

	' var_Items.CellCaption(var_Items.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(InsertItem(h,,`Child 1.1`),1) = `Child 1.2`"

	' var_Items.CellCaption(var_Items.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(InsertItem(h,,`Child 2.1`),1) = `Child 2.2`"

	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2.1")
	' var_Items.CellCaption(h,1) = "Root 2.2"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `Root 2.2`"

	' var_Items.CellCaption(var_Items.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(InsertItem(h,,`Child 1.1`),1) = `Child 1.2`"


253
How can I hide or show an item

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	h = var_Items.AddItem("hidden")
	' var_Items.ItemHeight(h) = 0
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ItemHeight(h) = 0"

	' var_Items.SelectableItem(h) = .f.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.SelectableItem(h) = False"

	var_Items.AddItem("visible")

120
How can I hide a column

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Hidden").Visible = .f.
var_Column = oComboBox.Columns.Add("Hidden")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Visible = False"

oComboBox.Columns.Add("2")
oComboBox.Columns.Add("3")
oComboBox.Columns.Add("4")
oComboBox.Columns.Add("5")

461
How can I have a case-sensitive filter

Dim oComboBox as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.MarkSearchColumn = .f.
var_Columns = oComboBox.Columns
	var_Column = var_Columns.Add("Car")
		var_Column.DisplayFilterButton = .t.
		var_Column.FilterType = 496 'exFilterDoCaseSensitive + exFilter
		var_Column.Filter = "Mazda"
	var_Column1 = var_Columns.Add("Equipment")
		var_Column1.DisplayFilterButton = .t.
		var_Column1.DisplayFilterPattern = .f.
		var_Column1.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
		var_Column1.FilterType = 259 'exFilterDoCaseSensitive + exPattern
		var_Column1.Filter = "Air Bag"
var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag`"

	' var_Items.CellCaption(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Toyota`),1) = `Air Bag,Air condition`"

	' var_Items.CellCaption(var_Items.AddItem("Ford"),1) = "Air condition"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Ford`),1) = `Air condition`"

	' var_Items.CellCaption(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`"

	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`"

	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `ABS,ESP`"

oComboBox.ApplyFilter()
oComboBox.EndUpdate()

462
How can I have a case-insensitive filter (exFilterDoCaseSensitive flag is not set)

Dim oComboBox as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.MarkSearchColumn = .f.
var_Columns = oComboBox.Columns
	var_Column = var_Columns.Add("Car")
		var_Column.DisplayFilterButton = .t.
		var_Column.FilterType = 240
		var_Column.Filter = "MAZDA"
	var_Column1 = var_Columns.Add("Equipment")
		var_Column1.DisplayFilterButton = .t.
		var_Column1.DisplayFilterPattern = .f.
		var_Column1.CustomFilter = "Air Bag||*Air Bag*|||Air condition||*Air condition*|||ABS||*ABS*|||ESP||*ESP*"
		var_Column1.FilterType = 3
		var_Column1.Filter = "AIR BAG"
var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag`"

	' var_Items.CellCaption(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Toyota`),1) = `Air Bag,Air condition`"

	' var_Items.CellCaption(var_Items.AddItem("Ford"),1) = "Air condition"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Ford`),1) = `Air condition`"

	' var_Items.CellCaption(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`"

	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`"

	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `ABS,ESP`"

oComboBox.ApplyFilter()
oComboBox.EndUpdate()

29
How can I get underlined only a portion of column's header

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Column 1").HTMLCaption = "<u>Col</u>umn 1"
var_Column = oComboBox.Columns.Add("Column 1")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.HTMLCaption = `<u>Col</u>umn 1`"


218
How can I get the number or the count of columns
Dim oComboBox as P
Dim var_Count as 

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Count = oComboBox.Columns.Count

519
How can I get the number of results/items being shown in the control's filter bar (sample 4)

Dim oComboBox as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
var_Column = oComboBox.Columns.Add("Item")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterList = 9504 'exShowExclude + exShowFocusItem + exShowCheckBox + exSortItemsAsc
var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarFont = oComboBox.Font
oComboBox.FilterBarPrompt = oComboBox.FormatABC("`<b>` + value",oComboBox.FilterBarPrompt)
oComboBox.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"
oComboBox.FilterBarPromptVisible = 3591 'exFilterBarCompact + exFilterBarShowCloseOnRight + exFilterBarShowCloseIfRequired + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
oComboBox.EndUpdate()

518
How can I get the number of results being shown in the control's filter bar (sample 3)

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarFont = oComboBox.Font
oComboBox.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : ``)"
oComboBox.FilterBarPromptVisible = 2055 'exFilterBarCompact + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
var_Column2 = oComboBox.Columns.Item(0)
	var_Column2.FilterType = 240
	var_Column2.Filter = "Item A|Item B"
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

517
How can I get the number of results being shown in the control's filter bar (sample 2, compact)

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarFont = oComboBox.Font
oComboBox.FilterBarCaption = "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)"
oComboBox.FilterBarPromptVisible = 2071 'exFilterBarCompact + exFilterBarSingleLine + exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
var_Column2 = oComboBox.Columns.Item(0)
	var_Column2.FilterType = 240
	var_Column2.Filter = "Item A|Item B"
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

516
How can I get the number of results being shown in the control's filter bar (sample 1)

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarFont = oComboBox.Font
oComboBox.FilterBarCaption = "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
oComboBox.FilterBarPromptVisible = 7 'exFilterBarCaptionVisible + exFilterBarVisible + exFilterBarPromptVisible
var_Column2 = oComboBox.Columns.Item(0)
	var_Column2.FilterType = 240
	var_Column2.Filter = "Item A|Item B"
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

504
How can I get the number of results after a filter is applied

' Occurs when the user presses and then releases the left mouse button over the list control.
function Click as v ()
	oComboBox = topparent:CONTROL_ACTIVEX1.activex
	oComboBox.ClearFilter()
end function

' Occurs when filter was changed.
function FilterChange as v ()
	oComboBox = topparent:CONTROL_ACTIVEX1.activex
	? "Items.MatchItemCount" 
	? oComboBox.Items.MatchItemCount 
	? oComboBox.FormatABC("value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",oComboBox.Items.MatchItemCount) 
end function

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarPromptVisible = 1
oComboBox.FilterBarPromptPattern = "Item"
oComboBox.EndUpdate()

420
How can I get the number of occurrences of a specified string in the cell

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("")
var_Column = oComboBox.Columns.Add("occurrences")
	var_Column.ComputedField = "lower(%0) count 'o'"
	var_Column.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1 oooof the root")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


399
How can I get the number of occurrences of a specified string in the cell

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("")
var_Column = oComboBox.Columns.Add("occurrences")
	var_Column.ComputedField = "lower(%0) count 'o'"
	var_Column.FormatColumn = "'contains ' + value + ' of \'o\' chars'"
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1 oooof the root")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"Child 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


277
How can I get the handle of an item based on the handle of the cell

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Default")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBold(var_Items.CellItem(var_Items.ItemCell(h,0))) = .t.
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.ItemBold(CellItem(ItemCell(h,0))) = True"


222
How can I get the columns as they are shown in the control's sortbar
Dim oComboBox as P
Dim var_Object as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Object = oComboBox.Columns.ItemBySortPosition(0)

386
How can I get second part of the date

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("Second").ComputedField = "sec(date(%0))"
var_Column = oComboBox.Columns.Add("Second")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `sec(date(%0))`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/11/2001 10:10:00})
	var_Items.AddItem({02/22/2002 11:01:22})
	var_Items.AddItem({03/13/2003 12:23:01})
	var_Items.AddItem({04/14/2004 13:11:59})

65
How can I get ride/hide of the "Filter For" field

Dim oComboBox as P
Dim var_Column as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Column")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterPattern = .f.

368
How can I get or display the integer part of the cell

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Number")
' oComboBox.Columns.Add("Int").ComputedField = "int(%0)"
var_Column = oComboBox.Columns.Add("Int")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `int(%0)`"

var_Items = oComboBox.Items
	var_Items.AddItem("-1.98")
	var_Items.AddItem("0.99")
	var_Items.AddItem("1.23")
	var_Items.AddItem("2.34")

379
How can I get only the year part from a date expression

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("Year").ComputedField = "year(%0)"
var_Column = oComboBox.Columns.Add("Year")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `year(%0)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001 10:00:00})
	var_Items.AddItem({02/02/2002 11:00:00})
	var_Items.AddItem({03/03/2003 12:00:00})
	var_Items.AddItem({04/04/2004 13:00:00})

385
How can I get minute part of the date

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("Minute").ComputedField = "min(date(%0))"
var_Column = oComboBox.Columns.Add("Minute")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `min(date(%0))`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/11/2001 10:10:00})
	var_Items.AddItem({02/22/2002 11:01:00})
	var_Items.AddItem({03/13/2003 12:23:00})
	var_Items.AddItem({04/14/2004 13:11:00})

309
How can I fix or lock items

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Default")
var_Items = oComboBox.Items
	' var_Items.LockedItemCount(0) = 1
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.LockedItemCount(0) = 1"

	' var_Items.CellCaption(var_Items.LockedItem(0,0),0) = "This is a locked item, fixed to the top side of the control."
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(LockedItem(0,0),0) = `This is a locked item, fixed to the top side of the control.`"

	' var_Items.ItemBackColor(var_Items.LockedItem(0,0)) = 12240068
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.ItemBackColor(LockedItem(0,0)) = 12240068"

	' var_Items.LockedItemCount(2) = 2
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.LockedItemCount(2) = 2"

	' var_Items.CellCaption(var_Items.LockedItem(2,0),0) = "This is a locked item, fixed to the top side of the control."
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(LockedItem(2,0),0) = `This is a locked item, fixed to the top side of the control.`"

	' var_Items.ItemBackColor(var_Items.LockedItem(2,0)) = 12240068
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.ItemBackColor(LockedItem(2,0)) = 12240068"

	' var_Items.CellCaption(var_Items.LockedItem(2,1),0) = "This is a locked item, fixed to the top side of the control."
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(LockedItem(2,1),0) = `This is a locked item, fixed to the top side of the control.`"

	' var_Items.ItemBackColor(var_Items.LockedItem(2,1)) = 12237498
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.ItemBackColor(LockedItem(2,1)) = 12237498"


307
How can I fix or lock an item on the top of the control

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Default")
var_Items = oComboBox.Items
	' var_Items.LockedItemCount(0) = 1
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.LockedItemCount(0) = 1"

	' var_Items.CellCaption(var_Items.LockedItem(0,0),0) = "This is a locked item, fixed to the top side of the control."
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(LockedItem(0,0),0) = `This is a locked item, fixed to the top side of the control.`"

	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


308
How can I fix or lock an item on the bottom side of the control

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Default")
var_Items = oComboBox.Items
	' var_Items.LockedItemCount(2) = 1
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.LockedItemCount(2) = 1"

	' var_Items.CellCaption(var_Items.LockedItem(2,0),0) = "This is a locked item, fixed to the bottom side of the control."
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(LockedItem(2,0),0) = `This is a locked item, fixed to the bottom side of the control.`"

	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


292
How can I find the cell being clicked in a radio group

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.MarkSearchColumn = .f.
oComboBox.SelBackColor = 8454143
oComboBox.SelForeColor = 0
oComboBox.Columns.Add("C1")
oComboBox.Columns.Add("C2")
oComboBox.Columns.Add("C3")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellCaption(h,1) = "Radio 1"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `Radio 1`"

	' var_Items.CellHasRadioButton(h,1) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellHasRadioButton(h,1) = True"

	' var_Items.CellRadioGroup(h,1) = 1234
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellRadioGroup(h,1) = 1234"

	' var_Items.CellCaption(h,2) = "Radio 2"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,2) = `Radio 2`"

	' var_Items.CellHasRadioButton(h,2) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellHasRadioButton(h,2) = True"

	' var_Items.CellRadioGroup(h,2) = 1234
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellRadioGroup(h,2) = 1234"

	' var_Items.CellState(h,1) = 1
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellState(h,1) = 1"

	' var_Items.CellBold(,var_Items.CellChecked(1234)) = .t.
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellBold(,CellChecked(1234)) = True"


489
How can I find if there is any filter applied to the control

' Occurs when filter was changed.
function FilterChange as v ()
	oComboBox = topparent:CONTROL_ACTIVEX1.activex
	? "If negative, the filter is present, else not" 
	? oComboBox.Items.VisibleItemCount 
end function

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.LinesAtRoot = -1
oComboBox.TreeColumnIndex = -1
oComboBox.FilterInclude = 4
var_Column = oComboBox.Columns.Add("Column")
	var_Column.DisplayFilterButton = .t.
	var_Column.FilterType = 240
	var_Column.Filter = "C1"
var_Items = oComboBox.Items
	h = var_Items.AddItem("R1")
	var_Items.InsertItem(h,,"C1")
	var_Items.InsertItem(h,,"C2")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("R2")
	var_Items.InsertItem(h,,"C1")
	var_Items.InsertItem(h,,"C2")
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

497
How can I find if the control is running in DPI mode
Dim oComboBox as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
? oComboBox.FormatABC("dpi = 1 ? `normal/stretch mode` : `dpi mode`") 

44
How can I filter the items that are between an interval/range of dates

Dim oComboBox as P
Dim var_Column as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Column")
	var_Column.DisplayFilterButton = .t.
	var_Column.DisplayFilterDate = .t.
oComboBox.ApplyFilter()

412
How can I filter programatically using more columns

Dim oComboBox as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Columns as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.MarkSearchColumn = .f.
var_Columns = oComboBox.Columns
	var_Columns.Add("Car")
	var_Columns.Add("Equipment")
var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag`"

	' var_Items.CellCaption(var_Items.AddItem("Toyota"),1) = "Air Bag,Air condition"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Toyota`),1) = `Air Bag,Air condition`"

	' var_Items.CellCaption(var_Items.AddItem("Ford"),1) = "Air condition"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Ford`),1) = `Air condition`"

	' var_Items.CellCaption(var_Items.AddItem("Nissan"),1) = "Air Bag,ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Nissan`),1) = `Air Bag,ABS,ESP`"

	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "Air Bag, ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `Air Bag, ABS,ESP`"

	' var_Items.CellCaption(var_Items.AddItem("Mazda"),1) = "ABS,ESP"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Mazda`),1) = `ABS,ESP`"

var_Column = oComboBox.Columns.Item("Car")
	var_Column.FilterType = 240
	var_Column.Filter = "Mazda"
var_Column1 = oComboBox.Columns.Item("Equipment")
	var_Column1.FilterType = 3
	var_Column1.Filter = "*ABS*|*ESP*"
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

426
How can I expand all items

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.LinesAtRoot = -1
oComboBox.Columns.Add("Items")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root 1")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	h = var_Items.AddItem("Root 2")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(0) = .t.
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.ExpandItem(0) = True"

oComboBox.EndUpdate()

341
How can I ensure that the drop down portions doesn't show partial items

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.IntegralHeight = .t.
oComboBox.LinesAtRoot = 1
oComboBox.TreeColumnIndex = 1
oComboBox.Columns.Add("Column 1")
oComboBox.Columns.Add("Column 2")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root 1.1")
	' var_Items.CellCaption(h,1) = "Root 1.2"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `Root 1.2`"

	' var_Items.CellCaption(var_Items.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(InsertItem(h,,`Child 1.1`),1) = `Child 1.2`"

	' var_Items.CellCaption(var_Items.InsertItem(h,,"Child 2.1"),1) = "Child 2.2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(InsertItem(h,,`Child 2.1`),1) = `Child 2.2`"

	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"

	h = var_Items.AddItem("Root 2.1")
	' var_Items.CellCaption(h,1) = "Root 2.2"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `Root 2.2`"

	' var_Items.CellCaption(var_Items.InsertItem(h,,"Child 1.1"),1) = "Child 1.2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(InsertItem(h,,`Child 1.1`),1) = `Child 1.2`"


580
How can I enable the clear-button (visible only if required)

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.HeaderVisible = .f.
oComboBox.IntegralHeight = .t.
oComboBox.ShowClearButton = 1
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	var_Items.AddItem("Zero")
	var_Items.AddItem("One")
	var_Items.AddItem("Two")
oComboBox.Template = "Select(0) = `Zero`" // oComboBox.Select(0) = "Zero"
oComboBox.EndUpdate()

584
How can I enable the clear-button (visible only if required and focused)
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.HeaderVisible = .f.
oComboBox.IntegralHeight = .t.
oComboBox.ShowClearButton = 3
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	var_Items.AddItem("Zero")
	var_Items.AddItem("One")
	var_Items.AddItem("Two")
oComboBox.Template = "Select(0) = `Zero`" // oComboBox.Select(0) = "Zero"
oComboBox.EndUpdate()

583
How can I enable the clear-button (visible only if focused)
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.HeaderVisible = .f.
oComboBox.IntegralHeight = .t.
oComboBox.ShowClearButton = 2
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	var_Items.AddItem("Zero")
	var_Items.AddItem("One")
	var_Items.AddItem("Two")
oComboBox.Template = "Select(0) = `Zero`" // oComboBox.Select(0) = "Zero"
oComboBox.EndUpdate()

581
How can I enable the clear-button (always visible)

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.HeaderVisible = .f.
oComboBox.IntegralHeight = .t.
oComboBox.ShowClearButton = -1
oComboBox.Columns.Add("Column")
var_Items = oComboBox.Items
	var_Items.AddItem("Zero")
	var_Items.AddItem("One")
	var_Items.AddItem("Two")
oComboBox.Template = "Select(0) = `Zero`" // oComboBox.Select(0) = "Zero"
oComboBox.EndUpdate()

18
How can I draw grid lines only for visible items

Dim oComboBox as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.MarkSearchColumn = .f.
oComboBox.DrawGridLines = -2
oComboBox.Columns.Add("Column 1")
oComboBox.Columns.Add("Column 2")
oComboBox.Items.AddItem(0)
oComboBox.Items.AddItem(1)
oComboBox.Items.AddItem(2)

554
How can I display UNICODE characters

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P
Dim var_StdFont as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
var_StdFont = oComboBox.Font
	var_StdFont.Name = "Arial Unicode"
	var_StdFont.Size = 22
oComboBox.HeaderVisible = .f.
oComboBox.DefaultItemHeight = 48
' oComboBox.Columns.Add("").Def(17) = 1
var_Column = oComboBox.Columns.Add("")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(17) = 1"

var_Items = oComboBox.Items
	var_Items.AddItem("Ӓӓ")
	var_Items.AddItem("ᦜᦝ;ᦞ")
	var_Items.AddItem("ɮɭ;ɯ")
	var_Items.AddItem("勳勴勵勶")
	' var_Items.FormatCell(var_Items.AddItem(oComboBox.Version),0) = "(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` "
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.FormatCell(AddItem(Me.Version),0) = `(value lfind ``UNICODE``) < 0 ? ``<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: `` + value : ```` `"

oComboBox.EndUpdate()

415
How can I display true or false instead 0 and -1

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
var_Column = oComboBox.Columns.Add("Boolean")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `value != 0 ? 'true' : 'false'`"

var_Items = oComboBox.Items
	var_Items.AddItem(.t.)
	var_Items.AddItem(.f.)
	var_Items.AddItem(.t.)
	var_Items.AddItem(0)
	var_Items.AddItem(1)

393
How can I display true or false instead 0 and -1

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Boolean").FormatColumn = "value != 0 ? 'true' : 'false'"
var_Column = oComboBox.Columns.Add("Boolean")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `value != 0 ? 'true' : 'false'`"

var_Items = oComboBox.Items
	var_Items.AddItem(.t.)
	var_Items.AddItem(.f.)
	var_Items.AddItem(.t.)
	var_Items.AddItem(0)
	var_Items.AddItem(1)

374
How can I display the time only of a date expression

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("Time").ComputedField = "'time is:' + time(date(%0))"
var_Column = oComboBox.Columns.Add("Time")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `'time is:' + time(date(%0))`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001 10:00:00})
	var_Items.AddItem({02/02/2002 11:00:00})
	var_Items.AddItem({03/03/2003 12:00:00})
	var_Items.AddItem({04/04/2004 13:00:00})

387
How can I display the number of days between two dates

Dim h as N
Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Start")
oComboBox.Columns.Add("End")
' oComboBox.Columns.Add("Duration").ComputedField = "(date(%1)-date(%0)) + ' days'"
var_Column = oComboBox.Columns.Add("Duration")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `(date(%1)-date(%0)) + ' days'`"

var_Items = oComboBox.Items
	h = var_Items.AddItem({01/11/2001})
	' var_Items.CellCaption(h,1) = {01/14/2001}
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = #1/14/2001#"

	h = var_Items.AddItem({02/22/2002})
	' var_Items.CellCaption(h,1) = {03/14/2002}
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = #3/14/2002#"

	h = var_Items.AddItem({03/13/2003})
	' var_Items.CellCaption(h,1) = {04/11/2003}
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = #4/11/2003#"


390
How can I display the currency only for not empty cells

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Number")
' oComboBox.Columns.Add("Currency").ComputedField = "len(%0) ? currency(dbl(%0)) : ''"
var_Column = oComboBox.Columns.Add("Currency")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `len(%0) ? currency(dbl(%0)) : ''`"

var_Items = oComboBox.Items
	var_Items.AddItem("1.23")
	var_Items.AddItem("2.34")
	var_Items.AddItem("0")
	' var_Items.ItemBackColor(var_Items.AddItem()) = 8421631
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.ItemBackColor(AddItem()) = 8421631"

	var_Items.AddItem("10000.99")

505
How can I display the control's filter on a single line (prompt-combined)

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarCaption = "`<r>` + value"
oComboBox.FilterBarPromptVisible = 2067 'exFilterBarCompact + exFilterBarSingleLine + exFilterBarVisible + exFilterBarPromptVisible
var_Column2 = oComboBox.Columns.Item(0)
	var_Column2.FilterType = 240
	var_Column2.Filter = "Item A|Item B"
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

506
How can I display the control's filter on a single line

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Item").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("Item")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"

var_Column1 = oComboBox.Columns.Add("Pos")
	var_Column1.AllowSizing = .f.
	var_Column1.AllowSort = .f.
	var_Column1.Width = 32
	var_Column1.FormatColumn = "1 apos ``"
	var_Column1.Position = 0
var_Items = oComboBox.Items
	var_Items.AddItem("Item A")
	var_Items.AddItem("Item B")
	var_Items.AddItem("Item C")
oComboBox.FilterBarCaption = "len(value) ? `filter for: <fgcolor 808080>` + value  : `<fgcolor 808080>no filter`"
oComboBox.FilterBarPromptVisible = 18 'exFilterBarSingleLine + exFilterBarVisible
var_Column2 = oComboBox.Columns.Item(0)
	var_Column2.FilterType = 240
	var_Column2.Filter = "Item A|Item B"
oComboBox.ApplyFilter()
oComboBox.EndUpdate()

400
How can I display the column using currency format and enlarge the font for certain values

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Currency")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
var_Items = oComboBox.Items
	var_Items.AddItem("1.23")
	var_Items.AddItem("2.34")
	var_Items.AddItem("9.94")
	var_Items.AddItem("11.94")
	var_Items.AddItem("1000")

422
How can I display the column using currency format and enlarge the font for certain values

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Currency")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)"
var_Items = oComboBox.Items
	var_Items.AddItem("1.23")
	var_Items.AddItem("2.34")
	var_Items.AddItem("9.94")
	var_Items.AddItem("11.94")
	var_Items.AddItem("1000")

391
How can I display the column using currency

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
var_Column = oComboBox.Columns.Add("Currency")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `currency(dbl(value))`"

var_Items = oComboBox.Items
	var_Items.AddItem("1.23")
	var_Items.AddItem("2.34")
	var_Items.AddItem("0")
	var_Items.AddItem(5)
	var_Items.AddItem("10000.99")

413
How can I display the column using currency

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Currency").FormatColumn = "currency(dbl(value))"
var_Column = oComboBox.Columns.Add("Currency")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `currency(dbl(value))`"

var_Items = oComboBox.Items
	var_Items.AddItem("1.23")
	var_Items.AddItem("2.34")
	var_Items.AddItem("0")
	var_Items.AddItem(5)
	var_Items.AddItem("10000.99")

356
How can I display the column's header using multiple lines

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.HeaderHeight = 128
oComboBox.HeaderSingleLine = .f.
' oComboBox.Columns.Add("This is just a column that should break the header.").Width = 32
var_Column = oComboBox.Columns.Add("This is just a column that should break the header.")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Width = 32"

oComboBox.Columns.Add("This is just another column that should break the header.")

56
How can I display the column's filter

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("").DisplayFilterButton = .t.
var_Column = oComboBox.Columns.Add("")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.DisplayFilterButton = True"


416
How can I display only the right part of the cell

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("")
var_Column = oComboBox.Columns.Add("Right")
	var_Column.ComputedField = "%0 right 2"
	var_Column.FormatColumn = "'\"' + value + '\"'"
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"SChild 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


395
How can I display only the right part of the cell

Dim h as N
Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("")
var_Column = oComboBox.Columns.Add("Right")
	var_Column.ComputedField = "%0 right 2"
	var_Column.FormatColumn = "'\"' + value + '\"'"
var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"SChild 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


380
How can I display only the month of the date

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("Month").ComputedField = "month(%0)"
var_Column = oComboBox.Columns.Add("Month")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `month(%0)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001 10:00:00})
	var_Items.AddItem({02/02/2002 11:00:00})
	var_Items.AddItem({03/03/2003 12:00:00})
	var_Items.AddItem({04/04/2004 13:00:00})

394
How can I display only the left part of the cell

Dim h as N
Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("")
' oComboBox.Columns.Add("Left").ComputedField = "%0 left 2"
var_Column = oComboBox.Columns.Add("Left")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `%0 left 2`"

var_Items = oComboBox.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	var_Items.InsertItem(h,,"SChild 3")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


381
How can I display only the day of the date

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("Day").ComputedField = "day(%0)"
var_Column = oComboBox.Columns.Add("Day")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `day(%0)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/11/2001 10:00:00})
	var_Items.AddItem({02/22/2002 11:00:00})
	var_Items.AddItem({03/13/2003 12:00:00})
	var_Items.AddItem({04/14/2004 13:00:00})

439
How can I display numbers with 2 digits in each group

Dim h as N
Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Def").Def(17) = 1
var_Column = oComboBox.Columns.Add("Def")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(17) = 1"

var_Items = oComboBox.Items
	h = var_Items.AddItem(100000.27)
	' var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.FormatCell(h,0) = `(value format '') +  ' <fgcolor=808080>(default)'`"

	h = var_Items.AddItem(100000.27)
	' var_Items.FormatCell(h,0) = "(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.FormatCell(h,0) = `(value format '||2') +  ' <fgcolor=808080>(grouping by 2 digits)'`"

oComboBox.EndUpdate()

367
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

Dim h as N
Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("").ComputedField = "proper(%0)"
var_Column = oComboBox.Columns.Add("")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `proper(%0)`"

var_Items = oComboBox.Items
	h = var_Items.AddItem("root")
	var_Items.InsertItem(h,,"child child")
	var_Items.InsertItem(h,,"child child")
	var_Items.InsertItem(h,,"child child")
	' var_Items.ExpandItem(h) = .t.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ExpandItem(h) = True"


168
How can I display my text on the scroll bar, using a different font

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Template = "ScrollPartCaption(1,256) = `This is <s><font Tahoma;12> just </font></s> text`" // oComboBox.ScrollPartCaption(1,256) = "This is <s><font Tahoma;12> just </font></s> text"
oComboBox.ColumnAutoResize = .f.
oComboBox.ScrollHeight = 20
' oComboBox.Columns.Add("C1").Width = 256
var_Column = oComboBox.Columns.Add("C1")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Width = 256"

' oComboBox.Columns.Add("C2").Width = 256
var_Column1 = oComboBox.Columns.Add("C2")
oComboBox.TemplateDef = "dim var_Column1"
oComboBox.TemplateDef = var_Column1
oComboBox.Template = "var_Column1.Width = 256"

' oComboBox.Columns.Add("C3").Width = 256
var_Column2 = oComboBox.Columns.Add("C3")
oComboBox.TemplateDef = "dim var_Column2"
oComboBox.TemplateDef = var_Column2
oComboBox.Template = "var_Column2.Width = 256"


167
How can I display my text on the scroll bar, using a different font

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_StdFont as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Template = "ScrollPartCaption(1,256) = `This is just a text`" // oComboBox.ScrollPartCaption(1,256) = "This is just a text"
' oComboBox.ScrollFont(1).Size = 12
var_StdFont = oComboBox.ScrollFont(1)
oComboBox.TemplateDef = "dim var_StdFont"
oComboBox.TemplateDef = var_StdFont
oComboBox.Template = "var_StdFont.Size = 12"

oComboBox.ColumnAutoResize = .f.
oComboBox.ScrollHeight = 20
' oComboBox.Columns.Add("C1").Width = 256
var_Column = oComboBox.Columns.Add("C1")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Width = 256"

' oComboBox.Columns.Add("C2").Width = 256
var_Column1 = oComboBox.Columns.Add("C2")
oComboBox.TemplateDef = "dim var_Column1"
oComboBox.TemplateDef = var_Column1
oComboBox.Template = "var_Column1.Width = 256"

' oComboBox.Columns.Add("C3").Width = 256
var_Column2 = oComboBox.Columns.Add("C3")
oComboBox.TemplateDef = "dim var_Column2"
oComboBox.TemplateDef = var_Column2
oComboBox.Template = "var_Column2.Width = 256"


166
How can I display my text on the scroll bar

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Template = "ScrollPartCaption(1,256) = `this is just a text`" // oComboBox.ScrollPartCaption(1,256) = "this is just a text"
oComboBox.ColumnAutoResize = .f.
' oComboBox.Columns.Add("C1").Width = 256
var_Column = oComboBox.Columns.Add("C1")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Width = 256"

' oComboBox.Columns.Add("C2").Width = 256
var_Column1 = oComboBox.Columns.Add("C2")
oComboBox.TemplateDef = "dim var_Column1"
oComboBox.TemplateDef = var_Column1
oComboBox.Template = "var_Column1.Width = 256"

' oComboBox.Columns.Add("C3").Width = 256
var_Column2 = oComboBox.Columns.Add("C3")
oComboBox.TemplateDef = "dim var_Column2"
oComboBox.TemplateDef = var_Column2
oComboBox.Template = "var_Column2.Width = 256"


438
How can I display my numbers using a different decimal separator

Dim h as N
Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
' oComboBox.Columns.Add("Def").Def(17) = 1
var_Column = oComboBox.Columns.Add("Def")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(17) = 1"

var_Items = oComboBox.Items
	h = var_Items.AddItem(100.27)
	' var_Items.FormatCell(h,0) = "(value format '') +  ' <fgcolor=808080>(default)'"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.FormatCell(h,0) = `(value format '') +  ' <fgcolor=808080>(default)'`"

	h = var_Items.AddItem(100.27)
	' var_Items.FormatCell(h,0) = "(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.FormatCell(h,0) = `(value format '|;') +  ' <fgcolor=808080>(decimal separator is <b>;</b>)'`"

oComboBox.EndUpdate()

414
How can I display icons or images instead numbers

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
var_Column = oComboBox.Columns.Add("Icons")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
var_Items = oComboBox.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)

392
How can I display icons or images instead numbers

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
var_Column = oComboBox.Columns.Add("Icons")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "'The cell displays the icon <img>'+value+'</img> instead ' + value"
var_Items = oComboBox.Items
	var_Items.AddItem(1)
	var_Items.AddItem(2)
	var_Items.AddItem(3)

397
How can I display dates in short format

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Date").FormatColumn = "shortdate(value)"
var_Column = oComboBox.Columns.Add("Date")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `shortdate(value)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001})
	var_Items.AddItem({02/02/2002})
	var_Items.AddItem({03/03/2003})
	var_Items.AddItem({04/04/2004})

375
How can I display dates in short format

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("ShortFormat").ComputedField = "shortdate(%0)"
var_Column = oComboBox.Columns.Add("ShortFormat")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `shortdate(%0)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001 10:00:00})
	var_Items.AddItem({02/02/2002 11:00:00})
	var_Items.AddItem({03/03/2003 12:00:00})
	var_Items.AddItem({04/04/2004 13:00:00})

418
How can I display dates in short format

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Date").FormatColumn = "shortdate(value)"
var_Column = oComboBox.Columns.Add("Date")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `shortdate(value)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001})
	var_Items.AddItem({02/02/2002})
	var_Items.AddItem({03/03/2003})
	var_Items.AddItem({04/04/2004})

419
How can I display dates in my format

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Date")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
var_Items = oComboBox.Items
	var_Items.AddItem({01/21/2001})
	var_Items.AddItem({02/22/2002})
	var_Items.AddItem({03/13/2003})
	var_Items.AddItem({04/24/2004})

398
How can I display dates in my format

Dim oComboBox as P
Dim var_Column as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
var_Column = oComboBox.Columns.Add("Date")
	' var_Column.Def(17) = 1
	oComboBox.TemplateDef = "dim var_Column"
	oComboBox.TemplateDef = var_Column
	oComboBox.Template = "var_Column.Def(17) = 1"

	var_Column.FormatColumn = "'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'"
var_Items = oComboBox.Items
	var_Items.AddItem({01/21/2001})
	var_Items.AddItem({02/22/2002})
	var_Items.AddItem({03/13/2003})
	var_Items.AddItem({04/24/2004})

417
How can I display dates in long format

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Date").FormatColumn = "longdate(value)"
var_Column = oComboBox.Columns.Add("Date")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `longdate(value)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001})
	var_Items.AddItem({02/02/2002})
	var_Items.AddItem({03/03/2003})
	var_Items.AddItem({04/04/2004})

396
How can I display dates in long format

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("Date").FormatColumn = "longdate(value)"
var_Column = oComboBox.Columns.Add("Date")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.FormatColumn = `longdate(value)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001})
	var_Items.AddItem({02/02/2002})
	var_Items.AddItem({03/03/2003})
	var_Items.AddItem({04/04/2004})

376
How can I display dates in long format

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.Columns.Add("Date")
' oComboBox.Columns.Add("LongFormat").ComputedField = "longdate(%0)"
var_Column = oComboBox.Columns.Add("LongFormat")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ComputedField = `longdate(%0)`"

var_Items = oComboBox.Items
	var_Items.AddItem({01/01/2001 10:00:00})
	var_Items.AddItem({02/02/2002 11:00:00})
	var_Items.AddItem({03/03/2003 12:00:00})
	var_Items.AddItem({04/04/2004 13:00:00})

271
How can I display an item or a cell on multiple lines

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.ScrollBySingleLine = .t.
oComboBox.Columns.Add("C1")
oComboBox.Columns.Add("C2")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellCaption(h,1) = "This is bit of text that's shown on multiple lines"
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `This is bit of text that's shown on multiple lines`"

	' var_Items.CellSingleLine(h,1) = .f.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellSingleLine(h,1) = False"


198
How can I display all cells using multiple lines

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("MultipleLine").Def(16) = .f.
var_Column = oComboBox.Columns.Add("MultipleLine")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(16) = False"

' oComboBox.Columns.Add("SingleLine").Def(16) = .t.
var_Column1 = oComboBox.Columns.Add("SingleLine")
oComboBox.TemplateDef = "dim var_Column1"
oComboBox.TemplateDef = var_Column1
oComboBox.Template = "var_Column1.Def(16) = True"

var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("This is a bit of long text that should break the line"),1) = "this is a bit of long text that's displayed on a single line"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`This is a bit of long text that should break the line`),1) = `this is a bit of long text that's displayed on a single line`"


199
How can I display all cells using HTML format

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("HTML").Def(17) = 1
var_Column = oComboBox.Columns.Add("HTML")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(17) = 1"

oComboBox.Items.AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.")

190
How can I display a tooltip when the cursor hovers the column

Dim oComboBox as P
Dim var_Column as local

oComboBox = topparent:CONTROL_ACTIVEX1.activex
' oComboBox.Columns.Add("tooltip").ToolTip = "This is a bit of text that is shown when user hovers the column."
var_Column = oComboBox.Columns.Add("tooltip")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.ToolTip = `This is a bit of text that is shown when user hovers the column.`"


159
How can I display a multiple pictures to a cell or item

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.DefaultItemHeight = 48
oComboBox.Template = "HTMLPicture(`pic1`) = `c:\exontrol\images\zipdisk.gif`" // oComboBox.HTMLPicture("pic1") = "c:\exontrol\images\zipdisk.gif"
oComboBox.Template = "HTMLPicture(`pic2`) = `c:\exontrol\images\auction.gif`" // oComboBox.HTMLPicture("pic2") = "c:\exontrol\images\auction.gif"
oComboBox.Columns.Add("C1")
var_Items = oComboBox.Items
	' var_Items.CellCaptionFormat(var_Items.AddItem("<img>pic1</img> Text <img>pic2</img> another text ..."),0) = 1
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaptionFormat(AddItem(`<img>pic1</img> Text <img>pic2</img> another text ...`),0) = 1"


406
How can I display a filter field in the bottom part of the drop down portion

Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.FilterForVisible = .t.
oComboBox.IntegralHeight = .t.
oComboBox.Columns.Add("Default")
var_Items = oComboBox.Items
	var_Items.AddItem("Item 1")
	var_Items.AddItem("Item 2")
	var_Items.AddItem("Item 3")
	var_Items.AddItem("Item 4")
	var_Items.AddItem("Item 5")
oComboBox.EndUpdate()

310
How can I display a divider item, merging all cells

Dim h as N
Dim oComboBox as P
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.MarkSearchColumn = .f.
oComboBox.TreeColumnIndex = -1
oComboBox.Columns.Add("C1")
oComboBox.Columns.Add("C2")
var_Items = oComboBox.Items
	h = var_Items.AddItem("Cell 1")
	' var_Items.CellCaption(h,1) = "This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines."
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellCaption(h,1) = `This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.`"

	' var_Items.CellSingleLine(h,1) = .f.
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellSingleLine(h,1) = False"

	h = var_Items.AddItem("This is bit of text that's displayed on the entire item, divider.")
	' var_Items.ItemDivider(h) = 0
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.ItemDivider(h) = 0"

	' var_Items.CellHAlignment(h,0) = 1
	oComboBox.TemplateDef = "dim var_Items,h"
	oComboBox.TemplateDef = var_Items
	oComboBox.TemplateDef = h
	oComboBox.Template = "var_Items.CellHAlignment(h,0) = 1"


485
How can I display a different column, on the control's label (method 2)

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.SingleEdit = .t.
oComboBox.LabelColumnIndex = 1
oComboBox.DrawGridLines = 2
' oComboBox.Columns.Add("Column 1").Def(17) = 1
var_Column = oComboBox.Columns.Add("Column 1")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(17) = 1"

' oComboBox.Columns.Add("Column 2").Def(17) = 1
var_Column1 = oComboBox.Columns.Add("Column 2")
oComboBox.TemplateDef = "dim var_Column1"
oComboBox.TemplateDef = var_Column1
oComboBox.Template = "var_Column1.Def(17) = 1"

var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("Item 1 on <b>Column 1"),1) = "Item 1 on <b>Column 2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 1 on <b>Column 1`),1) = `Item 1 on <b>Column 2`"

	' var_Items.CellCaption(var_Items.AddItem("Item 2 on <b>Column 1"),1) = "Item 2 on <b>Column 2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 2 on <b>Column 1`),1) = `Item 2 on <b>Column 2`"

	' var_Items.CellCaption(var_Items.AddItem("Item 3 on <b>Column 1"),1) = "Item 3 on <b>Column 2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 3 on <b>Column 1`),1) = `Item 3 on <b>Column 2`"

	' var_Items.SelectItem(var_Items.FirstVisibleItem) = .t.
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.SelectItem(FirstVisibleItem) = True"

oComboBox.EndUpdate()

484
How can I display a different column, on the control's label (method 1)

Dim oComboBox as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.SingleEdit = .t.
oComboBox.SearchColumnIndex = 1
oComboBox.DrawGridLines = 2
' oComboBox.Columns.Add("Column 1").Def(17) = 1
var_Column = oComboBox.Columns.Add("Column 1")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(17) = 1"

' oComboBox.Columns.Add("Column 2").Def(17) = 1
var_Column1 = oComboBox.Columns.Add("Column 2")
oComboBox.TemplateDef = "dim var_Column1"
oComboBox.TemplateDef = var_Column1
oComboBox.Template = "var_Column1.Def(17) = 1"

var_Items = oComboBox.Items
	' var_Items.CellCaption(var_Items.AddItem("Item 1 on <b>Column 1"),1) = "Item 1 on <b>Column 2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 1 on <b>Column 1`),1) = `Item 1 on <b>Column 2`"

	' var_Items.CellCaption(var_Items.AddItem("Item 2 on <b>Column 1"),1) = "Item 2 on <b>Column 2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 2 on <b>Column 1`),1) = `Item 2 on <b>Column 2`"

	' var_Items.CellCaption(var_Items.AddItem("Item 3 on <b>Column 1"),1) = "Item 3 on <b>Column 2"
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.CellCaption(AddItem(`Item 3 on <b>Column 1`),1) = `Item 3 on <b>Column 2`"

	' var_Items.SelectItem(var_Items.FirstVisibleItem) = .t.
	oComboBox.TemplateDef = "dim var_Items"
	oComboBox.TemplateDef = var_Items
	oComboBox.Template = "var_Items.SelectItem(FirstVisibleItem) = True"

oComboBox.EndUpdate()

410
How can I display a different caption in the label area, when I click the cell's check box

' Fired after cell's state has been changed.
function CellStateChanged as v (Cell  as  OLE::Exontrol.ComboBox.1::HCELL)
	oComboBox = topparent:CONTROL_ACTIVEX1.activex
	oComboBox.LabelText = Cell
	? oComboBox.Items.CellCaption(0,Cell) 
	? oComboBox.Items.CellState(0,Cell) 
end function

Dim oComboBox as P
Dim var_Column as local
Dim var_Items as P

oComboBox = topparent:CONTROL_ACTIVEX1.activex
oComboBox.BeginUpdate()
oComboBox.Style = 2
oComboBox.IntegralHeight = .t.
oComboBox.HeaderVisible = .f.
oComboBox.SingleEdit = .t.
oComboBox.SearchColumnIndex = -1
oComboBox.AdjustSearchColumn = .f.
' oComboBox.Columns.Add("Language").Def(0) = .t.
var_Column = oComboBox.Columns.Add("Language")
oComboBox.TemplateDef = "dim var_Column"
oComboBox.TemplateDef = var_Column
oComboBox.Template = "var_Column.Def(0) = True"

var_Items = oComboBox.Items
	var_Items.AddItem("English")
	var_Items.AddItem("Hebrew")
	var_Items.AddItem("Spanish")
oComboBox.LabelText = " <b>custom</b> text "
oComboBox.EndUpdate()